package com.link2room.rodimus.entity;

import com.link2room.common.entity.BaseEntity;
import org.hibernate.annotations.DynamicInsert;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * Created by LN on 2018/1/3
 */
@Entity
@DynamicInsert
@Table(name = "sign_in_detail")
public class SignInDetailEntity extends BaseEntity {
    public enum SignInDetailEntity_{
        signInDate,memberNo
    }
    private String memberNo;
    private Date signInDate;
    private String  isReissue;


    @Basic
    @Column(name = "member_no")
    public String getMemberNo() {
        return memberNo;
    }

    public void setMemberNo(String memberNo) {
        this.memberNo = memberNo;
    }

    @Basic
    @Column(name = "sign_in_date")
    public Date getSignInDate() {
        return signInDate;
    }

    public void setSignInDate(Date signInDate) {
        this.signInDate = signInDate;
    }

    @Basic
    @Column(name = "is_reissue")
    public String getIsReissue() {
        return isReissue;
    }

    public void setIsReissue(String isReissue) {
        this.isReissue = isReissue;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        SignInDetailEntity that = (SignInDetailEntity) o;

        if (memberNo != null ? !memberNo.equals(that.memberNo) : that.memberNo != null) return false;
        if (signInDate != null ? !signInDate.equals(that.signInDate) : that.signInDate != null) return false;
        return isReissue != null ? isReissue.equals(that.isReissue) : that.isReissue == null;
    }

    @Override
    public int hashCode() {
        int result = memberNo != null ? memberNo.hashCode() : 0;
        result = 31 * result + (signInDate != null ? signInDate.hashCode() : 0);
        result = 31 * result + (isReissue != null ? isReissue.hashCode() : 0);
        return result;
    }
}
